package NG::Sys::Cache::Memory;
use strict;
use warnings;
use utf8;

use base 'NG::Sys::Cache::Base';

my $cache = {};

sub create_cache {
	my ($self) = @_;
	$self->{cache} = $cache->{$self->{prefix}};
}
sub get {
	my ($self,$key) = @_;
	return $self->{cache}{$key};
}
sub set {
	my ($self,$key,$value) = @_;
	return $self->{cache}{$key} = $value;
}
sub remove {
	my ($self,$key) = @_;
	delete $self->{cache}{$key};
}
sub clear {
	my ($self) = @_;
	$self->{cache} = {};
}

1;
